unit uDm;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, ComCtrls, Uni, SQLiteUniProvider,
  OracleUniProvider, SQLServerUniProvider, MySQLUniProvider, db;

type

  { Tdm }

  Tdm = class(TDataModule)
    DataSource1: TDataSource;
    DataSource2: TDataSource;
    DataSource3: TDataSource;
    Datasource4: TDataSource;
    Datasource5: TDataSource;
    DataSource6: TDataSource;
    Datasource7: TDataSource;
    DataSource8: TDataSource;
    Datasource9: TDataSource;
    MySQLUniProvider1: TMySQLUniProvider;
    OracleUniProvider1: TOracleUniProvider;
    SQLiteUniProvider1: TSQLiteUniProvider;
    SQLServerUniProvider1: TSQLServerUniProvider;
    SQLServerUniProvider2: TSQLServerUniProvider;
    Unconisqllite: TUniConnection;
    UniConmysql: TUniConnection;
    UniConmysql1: TUniConnection;
    UniConora: TUniConnection;
    UniConora1: TUniConnection;
    UniConsql: TUniConnection;
    UniConsql1: TUniConnection;
    UniQuery1: TUniQuery;
    UniQuery3: TUniQuery;
    UniQuery4: TUniQuery;
    UniQuery4hazserver: TStringField;
    UniQuery4huausern: TStringField;
    UniQuery4huazaibz: TMemoField;
    UniQuery4huazauthon: TStringField;
    UniQuery4huazmode: TLongintField;
    UniQuery4huazNO: TStringField;
    UniQuery4huazpassw: TStringField;
    UniQuery4huazport: TStringField;
    UniQuery4huazuse: TLongintField;
    UniQuery4objname: TStringField;
    UniQuery5: TUniQuery;
    UniQuery6: TUniQuery;
    UniQuery7: TUniQuery;
    procedure UniQuery4huazmodeGetText(Sender: TField; var aText: string;
      DisplayText: Boolean);
    procedure UniQuery4huazmodeSetText(Sender: TField; const aText: string);
  private

  public

  end;

var
  dm: Tdm;

implementation

{$R *.lfm}

{ Tdm }

procedure Tdm.UniQuery4huazmodeGetText(Sender: TField; var aText: string;
  DisplayText: Boolean);
begin
     if  Sender.Value = 0 then
   begin
     aText := '本地连接';
   end
   else if Sender.Value = 1 then
   begin
     aText := '网络远程连接';
   end;
end;

procedure Tdm.UniQuery4huazmodeSetText(Sender: TField; const aText: string);
begin
       if aText  = '本地连接' then
   begin
     Sender.Value := 0;
   end
   else if aText = '网络远程连接' then
   begin
     Sender.Value := 1;
   end;
   //freeandnil()
end;

end.

